
log using "$rootpath/log/Table_4_Col1And3.log", replace
use "$rootpath/processed_data/Estimation_Data.dta", clear
drop if key_estimation_sample==0
reghdfe  log_emissions4 treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
reghdfe  log_damage55 treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
summarize treatXpost if post==1&e(sample)==1
gen mean_treat=r(mean)
summarize tot_damage if e(sample)==1
//Note the bottom is the total over 10 years. 
//So divide by 10 for the annual amount in the abstract. 
display mean_treat*r(N)*_b[treatXpost]*r(mean)
reghdfe  log_emissions4 treatXpost, absorb(facility_id n5#year) vce(cluster state_number)
reghdfe  log_damage55 treatXpost, absorb(facility_id n5#year) vce(cluster state_number)
log close
